package com.dal.module.account.paramcheck;

import com.dal.constant.ParamKey;
import com.jfinal.core.Controller;
import com.sojoys.artifact.exception.AbstractLogicModelException;
import com.sojoys.artifact.tools.ToolError;
import org.error.LoginErrorCode;

import java.util.Map;

/**
 * Created by fxf on 2018-1-19.
 */
public class HeiTaoParamChecker extends AbstractParamChecker {
    @Override
    public void platformParamCheck(Controller controller, Map outParam) throws AbstractLogicModelException {
        String token = controller.getPara(ParamKey.TOKEN);
        ToolError.isAndTrue(LoginErrorCode.NO_TOKEN, "无token参数", token == null || "".equals(token));
        outParam.put(ParamKey.TOKEN, token);
    }
}
